package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLDateTime;
import HLLib.base.HLString;
import HLLib.json.HLJSONArray;
import HLLib.json.HLJSONObject;

public class HLClassJSONArray extends HLLibClass {
    public HLClassJSONArray(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLJSONArray();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            ((HLJSONArray) self).Init((HLString)args.GetObject(0));
            break;
        }
        case 1: {
            if (resultOwnerObject == null) {
                ((HLJSONArray) self).isNull(args.GetInt(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLJSONArray) self).isNull(args.GetInt(0)));
            }
            break;
        }
        case 2: {
            if (resultOwnerObject == null) {
                ((HLJSONArray) self).length();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLJSONArray) self).length());
            }
            break;
        }
        case 3: {
            if (resultOwnerObject == null) {
                ((HLJSONArray) self).optInt(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLJSONArray) self).optInt(args.GetInt(0)));
            }
            break;
        }
        case 4: {
            if (resultOwnerObject == null) {
                ((HLJSONArray) self).putBool(args.GetBoolean(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLJSONArray) self).putBool(args.GetBoolean(0)));
            }
            break;
        }
        case 5: {
            ((HLJSONArray) self).putInt(args.GetInt(0));
            break;
        }
        case 6: {
            ((HLJSONArray) self).putString((HLString)args.GetObject(0));
            break;
        }
        case 7: {
            ((HLJSONArray) self).putJSONObject((HLJSONObject)args.GetObject(0));
            break;
        }
        case 8: {
            ((HLJSONArray) self).putJSONArray((HLJSONArray)args.GetObject(0));
            break;
        }
        case 9: {
            ((HLJSONArray) self).putBoolean(args.GetBoolean(0));
            break;
        }
        case 10: {
            ((HLJSONArray) self).putDateTime((HLDateTime)args.GetObject(0));
            break;
        }
        case 11: {
            ((HLJSONArray) self).putIntAtIndex(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 12: {
            ((HLJSONArray) self).putStringAtIndex(args.GetInt(0), (HLString)args.GetObject(0));
            break;
        }
        case 13: {
            ((HLJSONArray) self).putJSONObjecAtIndext(args.GetInt(0), (HLJSONObject)args.GetObject(0));
            break;
        }
        case 14: {
            ((HLJSONArray) self).putJSONArrayAtIndex(args.GetInt(0), (HLJSONArray)args.GetObject(0));
            break;
        }
        case 15: {
            ((HLJSONArray) self).putBooleanAtIndex(args.GetInt(0), args.GetBoolean(0));
            break;
        }
        case 16: {
            ((HLJSONArray) self).putDateTimeAtIndex(args.GetInt(0), (HLDateTime)args.GetObject(0));
            break;
        }
        case 17: {
            if (resultOwnerObject == null) {
                ((HLJSONArray) self).getInt(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLJSONArray) self).getInt(args.GetInt(0)));
            }
            break;
        }
        case 18: {
            if (resultOwnerObject == null) {
                ((HLJSONArray) self).getBoolean(args.GetInt(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLJSONArray) self).getBoolean(args.GetInt(0)));
            }
            break;
        }
        case 19: {
            if (resultOwnerObject == null) {
                ((HLJSONArray) self).getString(args.GetInt(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLJSONArray) self).getString(args.GetInt(0)));
            }
            break;
        }
        case 20: {
            if (resultOwnerObject == null) {
                ((HLJSONArray) self).getJSONArray(args.GetInt(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLJSONArray) self).getJSONArray(args.GetInt(0)));
            }
            break;
        }
        case 21: {
            if (resultOwnerObject == null) {
                ((HLJSONArray) self).getJSONObject(args.GetInt(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLJSONArray) self).getJSONObject(args.GetInt(0)));
            }
            break;
        }
        case 22: {
            if (resultOwnerObject == null) {
                ((HLJSONArray) self).getDateTime(args.GetInt(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLJSONArray) self).getDateTime(args.GetInt(0)));
            }
            break;
        }
        case 23: {
            if (resultOwnerObject == null) {
                ((HLJSONArray) self).toHLString();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLJSONArray) self).toHLString());
            }
            break;
        }
        }
    }
}
